package com.punai.customer.mapper;

import com.punai.common.core.mapper.CommonMapper;
import com.punai.customer.domain.CusFeature;
import com.punai.customer.domain.bo.CusFeatureBo;
import com.punai.customer.domain.bo.CusLinkFeatureBo;
import com.punai.customer.domain.bo.FeatureRes;
import com.punai.gk.domain.vo.SimplifyVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 特征Mapper接口
 *
 * @author ruoyi
 * @date 2022-12-04
 */
public interface CusFeatureMapper extends CommonMapper<CusFeature>
{
    public CusLinkFeatureBo selectCusFeatureById(@Param("id") String id, @Param("companyId") Long companyId);

    /**
     * 查询特征列表
     *
     * @param cusFeature 特征
     * @return 特征集合
     */
    public List<CusFeature> selectCusFeatureList(CusFeature cusFeature);

    public List<CusFeature> selectListExp(@Param("companyId") Long companyId);

    public List<CusFeature> selectIdFeatureNameList(CusFeature cusFeature);

    public List<String> selectIdList(@Param("companyId") Long companyId);


    /**
     * 删除特征
     *
     * @param id 特征主键
     * @return 结果
     */
    public int deleteCusFeatureById(String id);

    /**
     * 批量删除特征
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCusFeatureByIds(String[] ids);

    List<CusFeatureBo> selectLinkDataAndEntity(@Param("companyId") Long companyId, @Param("gxIds") String[] gxIds, @Param("gxType") String gxType);

    List<CusFeatureBo> selectLinkDataAndEntityCopy(@Param("companyId") Long companyId, @Param("gxIds") String[] gxIds, @Param("gxType") String gxType);

    List<FeatureRes> selectLinkDataAndEntityCopyOne(@Param("companyId") Long companyId, @Param("gxId") String gxId, @Param("gxType") String gxType);

    public String selectNameById(@Param("id") String id,@Param("companyId") Long companyId);

    public List<SimplifyVo> selectIdNameList(@Param("gxId") String gxId, @Param("companyId") Long companyId);

    List<CusFeature> selectListByAliasNameNew(@Param("companyId") Long companyId,@Param("aliasName") String aliasName,@Param("noInIds")List<String> noInIds);

}
